import axios from '@/utils/request'

const api = {
  getThresholdList: '/threshold/list', // 获取通道列表
  deleteCheckedApi: '/threshold/delete', // 删除选中条
  addThresholdList: '/threshold/add', // 添加
  editThresholdList: '/threshold/edit', // 添加
  getThresholdById: 'threshold/getById'
}



// 获取通道列表
export function getThresholdList (data) {
  return axios({
    url: api.getThresholdList,
    method: 'post',
    data
  })
}


export function getThresholdById (data) {
  return axios({
    url: api.getThresholdById,
    method: 'post',
    data
  })
}

// 删除选中条
export function deleteCheckedApi (data) {
  return axios({
    url: api.deleteCheckedApi,
    method: 'post',
    data
  })
}

// 开始任务
export function startTask (data) {
  return axios({
    url: api.startTaskApi,
    method: 'post',
    data
  })
}

// 停止任务
export function stopTask (data) {
  return axios({
    url: api.stopTaskApi,
    method: 'post',
    data
  })
}

// 添加通道
export function addThresholdList (data) {
  return axios({
    url: api.addThresholdList,
    method: 'post',
    data
  })
}

// 编辑通道
export function editThresholdList (data) {
  return axios({
    url: api.editThresholdList,
    method: 'post',
    data
  })
}

// 添加星历任务
export function createXingliTask (data) {
  return axios({
    url: api.createXingliTaskApi,
    method: 'post',
    data
  })
}

// 添加侦察任务
export function createZcTask (data) {
  return axios({
    url: api.createZcTaskApi,
    method: 'post',
    data
  })
}
